package com.smart.community.feign.emergency;

import com.smart.community.commons.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 紧急服务Feign降级处理
 * 
 * @author Wu.Liang
 */
@Slf4j
@Component
public class EmergencyFeignClientFallback implements EmergencyFeignClient {
    
    @Override
    public Result<?> getEmergencyPlan(Long communityId) {
        log.warn("应急预案服务调用失败，社区ID: {}", communityId);
        return Result.fail("应急预案服务暂时不可用");
    }
    
    @Override
    public Result<?> getEmergencyHelp(Long userId) {
        log.warn("紧急求助服务调用失败，用户ID: {}", userId);
        return Result.fail("紧急求助服务暂时不可用");
    }
    
    @Override
    public Result<?> getEmergencyContacts(Long userId) {
        log.warn("紧急联系人服务调用失败，用户ID: {}", userId);
        return Result.fail("紧急联系人服务暂时不可用");
    }
} 
